<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .search-wrap {
            width: 200px;
        }
        
        .parent {
            width: 32px;
            overflow: hidden;
            position: absolute;
            right: 100px;
            transition: all .3s;
        }
        
        .parent:hover {
            width: 200px;
        }
    </style>
</head>

<body>
    <div class="parent">
        <div class="search-wrap">搜索 <input type="text"></div>
    </div>
</body>

</html>